<%@ page import="java.sql.*" %>
<%@include file="../connection.jsp" %>

<%
            try {
                HttpSession ses = request.getSession(true);
                String ses_username = ses.getValue("ses_uname").toString();

                if (ses_username.equals("admin")) {
                    String id = request.getParameter("id");
                    String sql = "DELETE FROM t_user WHERE id='" + id + "' ";

                    stmt.executeUpdate(sql);
                    stmt.close();
                    conn.close();
                    response.sendRedirect("index.jsp");
                }
            } catch (Exception e) {
                out.println("login Admin error");
            }
%>